#ifndef WIDGET_H
#define WIDGET_H

#include <QWidget>
#include <QStackedWidget>
#include "TcpService.hpp"
#include "UdpService.hpp"
#include "login.h"
#include "loginviewmodel.h"
#include "menuscene.h"
#include "userregister.h"
#include "registerviewmodel.h"

QT_BEGIN_NAMESPACE
namespace Ui { class Widget; }
QT_END_NAMESPACE

class Widget : public QWidget
{
    Q_OBJECT

public:
    Widget(QWidget *parent = nullptr);
    ~Widget();

private slots:
private:
    void centerWindow(); // 居中窗口函数
private:
    Ui::Widget *ui;

    // 网络模块
    TcpService* tcpclient;
    UdpService* udpclient;

    Login* login_scene;
    UserRegister* userregister_scene;
    MenuScene* menu_scene;


    LoginViewModel* login_view_model;
    RegisterViewModel* register_view_model;





    QStackedWidget* stackedWidget;
};
#endif // WIDGET_H
